#include "irrlicht.h"
#include "driverChoice.h"

using namespace irr;
using namespace core;
using namespace scene;
using namespace video;
using namespace io;
using namespace gui;

#ifdef _IRR_WINDOWS_
#pragma comment(lib, "Irrlicht.lib")
#pragma comment(linker, "/subsystem:windows /ENTRY:mainCRTStartup")
#endif

extern int main(int argc, char** argv)
{
	video::E_DRIVER_TYPE driverType=video::EDT_OPENGL;
	
	if(driverType==video::EDT_COUNT)
	{
		return 1;
	}
	
	IrrlichtDevice *device = createDevice(driverType, core::dimension2d<u32>(640,480), 32, false);
	
	if(device==0)
	{
		return 1;
	}
	
	IVideoDriver* driver = device->getVideoDriver();
	ISceneManager* smgr = device->getSceneManager();
	
	while(device->run())
	{
		/*if(device->isWindowActive())
		{
			driver->beginScene(true, true, SColor(0,3,243,250));
			smgr->drawAll();
			driver->endScene();
		}*/
	}
	device->drop();
	return 0;
}